// Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov Date: 2004-11-26
// 18:18:11
//Home Page : http://members.fortunecity.com/neshkov/dj.html - Check often for
// new version!
//Decompiler options: packimports(3)

package cn.newtest.common.dbf;

import java.io.PrintStream;
import java.io.PrintWriter;

public class JDBFException extends Exception {

	/**
	 * 
	 */
	private static final long serialVersionUID = 433082206564170758L;

	public JDBFException(String s) {
		this(s, null);
	}

	public JDBFException(Throwable throwable) {
		this(throwable.getMessage(), throwable);
	}

	public JDBFException(String s, Throwable throwable) {
		super(s);
		detail = throwable;
	}

	public String getMessage() {
		if (detail == null)
			return super.getMessage();
		else
			return super.getMessage();
	}

	public void printStackTrace(PrintStream printstream) {
		if (detail == null)
			super.printStackTrace(printstream);
		else
			synchronized (printstream) {
				printstream.println(this);
				detail.printStackTrace(printstream);
			}
	}

	public void printStackTrace() {
		printStackTrace(System.err);
	}

	public void printStackTrace(PrintWriter printwriter) {
		if (detail == null)
			super.printStackTrace(printwriter);
		else
			synchronized (printwriter) {
				printwriter.println(this);
				detail.printStackTrace(printwriter);
			}
	}

	private Throwable detail;
}